#include <iostream>
#include "ros/ros.h"
#include "ctime"
int main(int argc,char **argv)
{
    time_t now = time(0);
    char *dt = ctime(&now);
    ros::init(argc,argv,"timer");
    ros::NodeHandle nh;
    ros::Rate loop_rate(2);
    while(ros::ok())
    {
        std::cout << "local date and time:  " << dt <<std::endl;
        ros::spinOnce();
        loop_rate.sleep();
    }
    return 0;
}